package com.zheng.rpc.exceptions;

import com.zheng.rpc.enums.RpcErrorMessageEnum;

/**
 * 自定义异常
 */
public class RpcException extends RuntimeException {
    public RpcException(RpcErrorMessageEnum errorMessage, String detail) {
        super(errorMessage.getMessage() + ":" + detail);
    }

    public RpcException(String message, Throwable cause) {
        super(message, cause);
    }

    public RpcException(RpcErrorMessageEnum rpcErrorMessageEnum) {
        super(rpcErrorMessageEnum.getMessage());
    }
}
